import request from '@/router/axios'
import { baseUrl } from '@/config/env'

// 添加部门
export function addDepartment(data) {
  return request({
    url: baseUrl + '/pc/department',
    method: 'post',
    data
  })
}

// 查询部门
export function getDepartment(data) {
  return request({
    url: baseUrl + '/pc/department',
    method: 'get',
    params: data
  })
}

// 更新部门
export function updateDepartment(data) {
  return request({
    url: baseUrl + '/pc/department',
    method: 'put',
    data
  })
}

// 删除部门
export function deleteDepartment(data) {
  return request({
    url: baseUrl + '/pc/department',
    method: 'delete',
    data
  })
}
